package demo.multithreading;

/**
 * 账户类
 * @author small瑞
 */
public class Amount {
    private String name;
    private boolean isHave;


    public Amount(String name , boolean isHave) {
        this.name = name;
        this.isHave = isHave;
    }

    public boolean isHave() {
        return isHave;
    }

    public void setHave(boolean have) {
        isHave = have;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public synchronized boolean isHaveMoney(){
        return this.isHave;
    }
}